package com.test.model;

import javax.persistence.*;
import java.util.Date;
import java.util.Set;

/**
 *
 * @author zxw
 * create 2016年3月7日 下午1:39:21
 */
@Entity
@Table(name="rcc_e_houseValve")
public class HouseValve extends EquModel{
   private Integer uniqueId;
   private String serialNo;
   private Integer caliber;
   private Model model;
    private NetEqu netEqu;
   private Collector collector;
   private Integer port;
   private Integer index;
   private Date installDate;
   private Date createDate;
   private House house;
   private StationBranch stationBranch;
   private String memo;
   private String detailPosition;
   private String panelSerialNo;
   private Boolean isReadCard;
   private Boolean isSettingTem;
   private Boolean isTemRange;
   private Boolean isTemControl;
   private Boolean isLockTem;
   private Set<HouseValveCurrentData> houseValveCurrentData;
//    private Set<HouseValveHistoricalData> houseValveHistoricalData;



   @Id
   @GeneratedValue
   @Column(name = "uniqueId", unique = true, nullable = false)
   public Integer getUniqueId() {
       return uniqueId;
   }
   public void setUniqueId(Integer uniqueId) {
       this.uniqueId = uniqueId;
   }
    @Column(name = "serialNo")
   public String getSerialNo() {
       return serialNo;
   }
   public void setSerialNo(String serialNo) {
       this.serialNo = serialNo;
   }
    @Column(name = "caliber")
   public Integer getCaliber() {
       return caliber;
   }
   public void setCaliber(Integer caliber) {
       this.caliber = caliber;
   }
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "modelId")
   public Model getModel() {
       return model;
   }
   public void setModel(Model model) {
       this.model = model;
   }
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "netEquId")
    public NetEqu getNetEqu() {
        return netEqu;
    }

    public void setNetEqu(NetEqu netEqu) {
        this.netEqu = netEqu;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "collectorId")
   public Collector getCollector() {
       return collector;
   }
   public void setCollector(Collector collector) {
       this.collector = collector;
   }
    @Column(name = "`port`")
   public Integer getPort() {
       return port;
   }
   public void setPort(Integer port) {
       this.port = port;
   }
    @Column(name = "`index`")
   public Integer getIndex() {
       return index;
   }
   public void setIndex(Integer index) {
       this.index = index;
   }
   @Column(name = "installDate")
   public Date getInstallDate() {
       return installDate;
   }
   public void setInstallDate(Date installDate) {
       this.installDate = installDate;
   }
    @Column(name = "createDate")
   public Date getCreateDate() {
       return createDate;
   }
   public void setCreateDate(Date createDate) {
       this.createDate = createDate;
   }
   @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "houseId")
    public House getHouse() {
       return house;
   }
   public void setHouse(House house) {
       this.house = house;
   }
   @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "stationBranchId")
   public StationBranch getStationBranch() {
       return stationBranch;
   }
   public void setStationBranch(StationBranch stationBranch) {
       this.stationBranch = stationBranch;
   }
   @Column(name = "memo")
   public String getMemo() {
       return memo;
   }
   public void setMemo(String memo) {
       this.memo = memo;
   }
    @Column(name = "detailPosition")
   public String getDetailPosition() {
       return detailPosition;
   }
   public void setDetailPosition(String detailPosition) {
       this.detailPosition = detailPosition;
   }
   @Column(name = "panelSerialNo")
   public String getPanelSerialNo() {
       return panelSerialNo;
   }
   public void setPanelSerialNo(String panelSerialNo) {
       this.panelSerialNo = panelSerialNo;
   }
   @Column(name = "isReadCard")
   public Boolean getIsReadCard() {
       return isReadCard;
   }
   public void setIsReadCard(Boolean isReadCard) {
       this.isReadCard = isReadCard;
   }
   @Column(name = "isSettingTem")
   public Boolean getIsSettingTem() {
       return isSettingTem;
   }
   public void setIsSettingTem(Boolean isSettingTem) {
       this.isSettingTem = isSettingTem;
   }
   @Column(name = "isTemRange")
   public Boolean getIsTemRange() {
       return isTemRange;
   }
   public void setIsTemRange(Boolean isTemRange) {
       this.isTemRange = isTemRange;
   }
   @Column(name = "isTemControl")
   public Boolean getIsTemControl() {
       return isTemControl;
   }
   public void setIsTemControl(Boolean isTemControl) {
       this.isTemControl = isTemControl;
   }
   @Column(name = "isLockTem")
   public Boolean getIsLockTem() {
       return isLockTem;
   }
   public void setIsLockTem(Boolean isLockTem) {
       this.isLockTem = isLockTem;
   }

   @OneToMany(mappedBy = "houseValve")
   public Set<HouseValveCurrentData> getHouseValveCurrentData() {
       return houseValveCurrentData;
   }
   public void setHouseValveCurrentData(Set<HouseValveCurrentData> houseValveCurrentData) {
       this.houseValveCurrentData = houseValveCurrentData;
   }

//    @OneToMany(mappedBy = "householdValve")
//    public Set<HouseValveHistoricalData> getHouseValveHistoricalData() {
//        return houseValveHistoricalData;
//    }
//
//    public void setHouseValveHistoricalData(Set<HouseValveHistoricalData> houseValveHistoricalData) {
//        this.houseValveHistoricalData = houseValveHistoricalData;
//    }
}
